﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Threading;
using OpenQA.Selenium;
using OpenQA.Selenium.Firefox;

namespace Selenium
{
    class Program
    {
        static void Main(string[] args)
        {
            String userName = "Administrator";
            String password = "FPM.BUDKO1123085";

            WebDriver driver = new WebDriver();
            Email mail = new Email();
            mail.To = "Administrator";
            mail.Subject = "This is subject of test email";
            mail.Body = "This is body of test email. Type your message here...";

            mail.openOwa(userName, password, driver);
            mail.sendEmail(mail, driver);
            mail.deleteLastEmail(driver);
            mail.restoreLastMessage(driver);
            Email restore=mail.getLastMessageInfo(driver);
            driver.close();
        }
    }
}
